package com.example.springbootdeom.serviceImpl;

import com.example.springbootdeom.dao.StudentDao;
import com.example.springbootdeom.entity.Course;
import com.example.springbootdeom.entity.Student;
import com.example.springbootdeom.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao studentDao;

    @Override
    public Student getstudent(int id) {

        return studentDao.getstudent(id);
    }

    @Override
    public Boolean updateMsg(Student student) {

        return studentDao.updateMsg(student);
    }



    @Override
    public List<Course> getAllCourse(int id) {
        return studentDao.getAllCourse(id);
    }

    @Override
    public boolean addCourse(int stuId, int courserId) {
        return studentDao.addCourse(stuId,courserId);
    }
}
